
package interfaces.Interfaz1;

import controller.Game;
import java.awt.BorderLayout;


public class VentanaNivel extends javax.swing.JFrame {
    
    Game juego;
    
    /**
     * Creates new form ventana
     */
    public VentanaNivel(Game juegoselect) {
        initComponents();
        juego=juegoselect;
        PanelFondoNivel F = new PanelFondoNivel();
        this.setResizable(false);
        this.add(F,BorderLayout.CENTER);
        this.pack();
    }
    
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        buttonGroup1 = new javax.swing.ButtonGroup();
        buttonGroup2 = new javax.swing.ButtonGroup();
        buttonGroup3 = new javax.swing.ButtonGroup();
        Facil = new javax.swing.JButton();
        Medio = new javax.swing.JButton();
        Dificil = new javax.swing.JButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("Nivel");
        setPreferredSize(new java.awt.Dimension(1000, 800));

        Facil.setBackground(new java.awt.Color(51, 255, 51));
        Facil.setFont(new java.awt.Font("SimSun", 0, 24)); // NOI18N
        Facil.setText("Facil");
        Facil.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                FacilActionPerformed(evt);
            }
        });

        Medio.setBackground(new java.awt.Color(255, 255, 0));
        Medio.setFont(new java.awt.Font("SimSun", 0, 24)); // NOI18N
        Medio.setText("Medio");
        Medio.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                MedioActionPerformed(evt);
            }
        });

        Dificil.setBackground(new java.awt.Color(255, 0, 0));
        Dificil.setFont(new java.awt.Font("SimSun", 0, 24)); // NOI18N
        Dificil.setText("Dificil");
        Dificil.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                DificilActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addGap(0, 0, Short.MAX_VALUE)
                .addComponent(Facil, javax.swing.GroupLayout.PREFERRED_SIZE, 171, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(204, 204, 204))
            .addGroup(layout.createSequentialGroup()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addGap(206, 206, 206)
                        .addComponent(Dificil, javax.swing.GroupLayout.PREFERRED_SIZE, 171, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(layout.createSequentialGroup()
                        .addGap(489, 489, 489)
                        .addComponent(Medio)))
                .addContainerGap(591, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGap(242, 242, 242)
                .addComponent(Medio)
                .addGap(66, 66, 66)
                .addComponent(Dificil)
                .addGap(13, 13, 13)
                .addComponent(Facil)
                .addContainerGap(499, Short.MAX_VALUE))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void MedioActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_MedioActionPerformed

        VentanaSudoku tablero = new VentanaSudoku(2);
        tablero.show();
        show(false);
    }//GEN-LAST:event_MedioActionPerformed

    private void DificilActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_DificilActionPerformed

        VentanaSudoku tablero = new VentanaSudoku(3);
        tablero.show();
        show(false);
    }//GEN-LAST:event_DificilActionPerformed

    private void FacilActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_FacilActionPerformed

        VentanaSudoku tablero = new VentanaSudoku(1);
        tablero.show();
        show(false);
    }//GEN-LAST:event_FacilActionPerformed

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton Dificil;
    private javax.swing.JButton Facil;
    private javax.swing.JButton Medio;
    private javax.swing.ButtonGroup buttonGroup1;
    private javax.swing.ButtonGroup buttonGroup2;
    private javax.swing.ButtonGroup buttonGroup3;
    // End of variables declaration//GEN-END:variables
}
